package com.gitee.wsl.platform



interface AppDirs {

    fun getUserDataDir(
        roaming: Boolean = false
    ): String

    fun getUserConfigDir(
        roaming: Boolean = false
    ): String

    fun getUserCacheDir(): String

    fun getSiteDataDir(
        multiPath: Boolean = false
    ): String

    fun getSiteConfigDir(
        multiPath: Boolean = false
    ): String

    fun getUserLogDir(): String

    fun getSharedDir(): String

    companion object{
        lateinit var saved: AppDirs
    }
}

expect fun AppDirs(
    appName: String?,
    appAuthor: String? = null,
    vararg extra: String
): AppDirs

class AppDirsException : RuntimeException {
    constructor() : super()
    constructor(message: String?, cause: Throwable?) : super(message, cause)
    constructor(message: String?) : super(message)
    constructor(cause: Throwable?) : super(cause)
}